package com.example.mobile2021606163crw0303;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
    int result;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        TextView tvResult = findViewById(R.id.tvResult);
        for (int i = 0; i <10;i++) {
            result+=i;
        }
        result = myAdd(10,result);
        tvResult.setText(String.valueOf(result));
    }
    public int myAdd(int a ,int b){
        a*=2;
        b+=5;
        return a+b;
    }
}